<?php
	$title = mysql_escape_string($_POST ["title"]);
	$address = mysql_escape_string($_POST ["address"]);
	
	require_once ("../../config.inc.php");
	require_once ("../../include/mysql.inc.php");
	require_once ("../../include/link.inc.php");
	$LinkDao = new Link();
	$id =0;
	$visit =1;
	$flag = $LinkDao->add($id, $title, $address, $visit);
	if ($flag) {
		echo "添加链接成功！<br/><a href='../../admin/linkList.php'>跳转到链接列表</a>";
	}
	else {
		echo "添加链接失败！<br/><a href='' onclick='javascript:history.back(-1);'>返回到链接列表</a>";
	}
	
?>